<?php
# ============================================================================
# 版权所有  Chilcoo.com，并保留所有权利。
# 网站地址: http://www.chilcoo.com/erphp
# ----------------------------------------------------------------------------
# 这不是一个自由软件！你不能通过任何方式破解本软件.
# 使用:不允许对程序代码以任何形式任何目的的再发布。
# ============================================================================
# $Author: Chilcoo Inc. *
# $Official website : www.chilcoo.com
# 
# 文件信息:
# File : /order.inc.php
# 出库管理
class order{
	# 数据库套件
	private $database;
	function __construct(){
		$this->database = new db(config::conf_db_host,config::conf_db_user,
			config::conf_db_password,config::conf_db_name);
	}
	
	function sell_dates(){
		global $_login;
		$sql = "SELECT dates,COUNT(*) AS cnt FROM cs2_sell 
			GROUP BY dates,realfee HAVING (realfee IS NULL) ORDER BY dates DESC;";
		$rows = $this->database->select($sql);
		return $rows;
	}
	function sell_nosend(){
		$sql = "SELECT sellId,dates,sellguid,buyerId,fee,status,tofee,post,address,
				name,tel,adminId,realfee,sendno
			 FROM cs2_sell WHERE realfee IS NULL ORDER BY dates DESC;";
		$rows = $this->database->select($sql);
		return $rows;
	}
	function slist_nosend(){
		$sql = "SELECT slistId,cs2_slist.sellguid,auctionId,price,cs2_prod.name,model
			 FROM cs2_slist LEFT JOIN (cs2_sell,cs2_prod) ON (cs2_sell.sellguid = cs2_slist.sellguid AND cs2_prod.prodId=cs2_slist.prodId ) 
		WHERE cs2_sell.realfee IS NULL;";
		$rows = $this->database->select($sql);
		return $rows;
	}
}
$_order = new order();
?>